package scjp.jaba.cap1.classmembers.accessmodifiers.other;

import scjp.jaba.cap1.classmembers.accessmodifiers.certification.Parent;

//Pacotes diferentes
public class Child extends Parent{

	public void testIt(){
		System.out.println("x is " + x); // No problem; Child inherits x
				
		Parent p = new Parent(); // Can we access x using the p reference?
		System.out.println("X in parent is " + p.x); // Compiler error!

		System.out.println("y is " + y); // Compiler error!
		System.out.println("Y in parent is " + p.y); // Compiler error!
	}
}
